Saving Movies
The Movie Toolbox provides a set of high-level functions for storing movies within files. These files have a file type of'MooV'
and a resource type of'moov'
. Your application can gain access to existing movies with either theNewMovieFromFile
function or theNewMovieFromDataFork
function (described on page 2-76 and page 2-96, respectively). Once you have loaded the movie, your application uses the functions that are described in this section to save any changes you have made to the movie.You can use the
AddMovieResource
function to add a new movie resource to a movie file. Your application can use this function to save a movie that it created using the functions described in "Functions for Editing Movies" beginning on page 2-226. You can use theUpdateMovieResource
function to replace an existing movie resource in a movie file. You can remove a movie resource by calling theRemoveMovieResource
function.The movie resources that your application creates with the
AddMovieResource
andUpdateMovieResource
functions may contain references to movie data. These references identify the data that constitute the movie. However, the movie data can be stored outside of the movie file. If you want to create a movie file that contains all of its movie data, use theFlattenMovie
function. If you want to create a single-fork movie file, use theFlattenMovieData
function.The
PutMovieIntoHandle
function places a QuickTime movie into a handle. You can then convert the movie into specialized data formats.The
HasMovieChanged
andClearMovieChanged
functions allow your application to work with the movie changed flag that is maintained by the Movie Toolbox. You can use this flag to determine whether a movie has been changed.The movie changed flag indicates whether you have changed the movie. Such actions as editing the movie, adding samples to a media, or changing a data reference cause the flag to indicate that the movie has changed. There are several operations that the movie changed flag does not reflect, including changing the volume, rate, or time settings for the movie. These settings change frequently when a movie is played. Your application must monitor these settings itself.
The Movie Toolbox also supplies functions for storing and retrieving movies that are stored in the data fork of a file. These functions provide robust data reference resolution and improve low memory performance. The
NewMovieFromDataFork
function enables you to retrieve a movie that is stored anywhere in the data fork of a file. You can use thePutMovieIntoDataFork
function to store an atom version of a specified movie in the data fork of a file.
Subtopics
- HasMovieChanged
- ClearMovieChanged
- AddMovieResource
- UpdateMovieResource
- RemoveMovieResource
- PutMovieIntoHandle
- FlattenMovie
- FlattenMovieData
- NewMovieFromDataFork
- PutMovieIntoDataFork